class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: E = None
        self.q: B = None
        self.x: B = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.t: B = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.y: D = None
        self.p: F = None
        self.v: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: C = None
        self.t: B = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: D = None
        self.y: D = None
        self.p: F = None
        self.v: F = None
        self.r: E = None
        self.txt = txt

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

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

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