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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

b = A("b")
f = B("f")
k = C("k")
a = D("a")
c = E("c")
g = F("g")
i = A("i")
n = E("n")
e = C("e")
m = B("m")

b.x = i
b.r = g
b.z = n
f.s = m
f.r = m
f.u = g
k.y = c
k.r = a
k.p = a
k.q = i
k.s = g
k.o = m
a.u = g
a.t = c
a.s = m
a.o = i
a.y = k
c.z = k
c.v = k
g.t = i
g.q = i
g.x = i
g.o = a
g.y = e
i.x = b
i.r = g
i.z = c
n.z = k
n.v = e
e.y = n
e.r = a
e.p = a
e.q = i
e.s = g
e.o = m
m.s = f
m.r = f
m.u = g
assert k.y.z.r.s.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

b = A("b")
f = B("f")
k = C("k")
a = D("a")
c = E("c")
g = F("g")
i = A("i")
n = E("n")
e = C("e")
m = B("m")

b.x = i
b.r = g
b.z = n
f.s = m
f.r = m
f.u = g
k.y = c
k.r = a
k.p = a
k.q = i
k.s = g
k.o = m
a.u = g
a.t = c
a.s = m
a.o = i
a.y = k
c.z = k
c.v = k
g.t = i
g.q = i
g.x = i
g.o = a
g.y = e
i.x = b
i.r = g
i.z = c
n.z = k
n.v = e
e.y = n
e.r = a
e.p = a
e.q = i
e.s = g
e.o = m
m.s = f
m.r = f
m.u = g
assert k.y.z.r.s.u.o.txt == "a"