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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.s: D = None
        self.o: E = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: E = None
        self.s: D = None
        self.o: E = None
        self.q: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

l.o = f
l.r = h
h.z = m
j.y = l
j.v = f
j.o = f
j.t = f
j.s = e
j.q = h
e.y = c
e.s = m
e.z = l
f.y = h
f.o = l
c.t = i
c.y = m
c.w = h
i.t = c
i.y = m
i.w = h
d.t = i
d.y = k
d.w = h
k.y = c
k.s = e
k.z = l
m.y = c
m.s = k
m.z = l
assert d.y.s.y.txt == "c"