class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.q: E = None
        self.s: G = None
        self.y: C = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.s: C = None
        self.p: G = None
        self.r: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.q: D = None
        self.p: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.o: B = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: A = None
        self.txt = txt

j = A("j")
a = B("a")
c = C("c")
g = D("g")
l = E("l")
d = F("d")
h = G("h")
f = B("f")

j.p = l
j.q = l
j.t = d
j.v = d
j.s = h
j.y = c
j.r = a
a.v = d
a.q = g
a.s = c
a.p = h
a.r = f
c.y = a
c.w = j
c.q = g
c.p = h
c.u = d
g.o = j
g.q = d
l.x = g
l.s = c
l.p = c
l.o = f
l.r = d
d.x = c
d.p = c
d.w = c
h.z = d
h.v = j
h.x = j
f.v = d
f.q = g
f.s = c
f.p = h
f.r = a
assert g.q.w.w.p.o.s.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.q: E = None
        self.s: G = None
        self.y: C = None
        self.r: B = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.s: C = None
        self.p: G = None
        self.r: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.q: D = None
        self.p: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: C = None
        self.o: B = None
        self.r: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.x: A = None
        self.txt = txt

j = A("j")
a = B("a")
c = C("c")
g = D("g")
l = E("l")
d = F("d")
h = G("h")
f = B("f")

j.p = l
j.q = l
j.t = d
j.v = d
j.s = h
j.y = c
j.r = a
a.v = d
a.q = g
a.s = c
a.p = h
a.r = f
c.y = a
c.w = j
c.q = g
c.p = h
c.u = d
g.o = j
g.q = d
l.x = g
l.s = c
l.p = c
l.o = f
l.r = d
d.x = c
d.p = c
d.w = c
h.z = d
h.v = j
h.x = j
f.v = d
f.q = g
f.s = c
f.p = h
f.r = a
assert g.q.w.w.p.o.s.u.w.txt == "c"