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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.z: C = None
        self.s: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.z: C = None
        self.s: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: F = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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