class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: B = None
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

i = A("i")
m = B("m")
b = C("b")
l = D("l")
k = E("k")
d = F("d")
f = D("f")
n = E("n")

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

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

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

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

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

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

i = A("i")
m = B("m")
b = C("b")
l = D("l")
k = E("k")
d = F("d")
f = D("f")
n = E("n")

i.u = k
i.y = k
i.v = m
i.x = l
i.t = l
i.p = f
m.y = d
m.o = b
b.p = l
b.y = l
b.o = d
b.r = d
b.q = d
l.p = m
l.z = i
l.u = i
l.v = i
l.q = n
l.r = d
k.q = b
k.s = b
k.o = n
k.u = d
d.u = b
f.p = m
f.z = i
f.u = i
f.v = i
f.q = n
f.r = d
n.q = b
n.s = b
n.o = k
n.u = d
assert n.s.y.q.s.o.u.txt == "b"