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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

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