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

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

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

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

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

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

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

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

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

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

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

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

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

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

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