class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

f = A("f")
k = B("k")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
d = F("d")
c = E("c")

f.r = k
k.s = d
k.u = l
k.w = c
k.x = m
k.o = m
k.y = m
h.s = k
h.r = l
h.t = c
h.x = a
m.x = k
m.t = h
m.y = a
l.r = m
l.q = m
l.y = m
l.o = m
l.v = m
l.s = d
a.t = c
a.r = c
a.w = l
a.z = l
a.v = h
d.t = l
d.w = l
d.z = l
d.r = l
d.v = h
c.r = m
c.q = m
c.y = m
c.o = m
c.v = m
c.s = d
assert h.t.o.t.s.x.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

f = A("f")
k = B("k")
h = C("h")
m = D("m")
l = E("l")
a = F("a")
d = F("d")
c = E("c")

f.r = k
k.s = d
k.u = l
k.w = c
k.x = m
k.o = m
k.y = m
h.s = k
h.r = l
h.t = c
h.x = a
m.x = k
m.t = h
m.y = a
l.r = m
l.q = m
l.y = m
l.o = m
l.v = m
l.s = d
a.t = c
a.r = c
a.w = l
a.z = l
a.v = h
d.t = l
d.w = l
d.z = l
d.r = l
d.v = h
c.r = m
c.q = m
c.y = m
c.o = m
c.v = m
c.s = d
assert h.t.o.t.s.x.x.o.txt == "m"