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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.u: F = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: C = None
        self.u: F = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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