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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.q: E = None
        self.w: A = None
        self.u: G = None
        self.r: E = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.q: E = None
        self.w: A = None
        self.u: G = None
        self.r: E = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.txt = txt

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

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

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