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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: A = None
        self.y: E = None
        self.o: A = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.s: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: A = None
        self.y: E = None
        self.o: A = None
        self.p: E = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.s: D = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

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

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