class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.u: B = None
        self.z: A = None
        self.y: D = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.o: E = None
        self.r: E = None
        self.v: A = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: D = None
        self.u: B = None
        self.z: A = None
        self.y: D = None
        self.r: F = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: F = None
        self.o: E = None
        self.r: E = None
        self.v: A = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: B = None
        self.txt = txt

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

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

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

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