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

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

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

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

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

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

i = A("i")
j = B("j")
g = C("g")
l = D("l")
d = E("d")
e = F("e")
a = D("a")
n = E("n")
c = F("c")
h = E("h")

i.o = h
j.x = a
j.u = a
j.w = g
j.o = e
g.o = l
l.w = j
d.r = l
d.s = j
d.x = j
d.o = c
d.u = n
e.y = c
e.o = g
a.w = j
n.r = l
n.s = j
n.x = j
n.o = c
n.u = d
c.y = e
c.o = g
h.r = l
h.s = j
h.x = j
h.o = e
h.u = n
assert h.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

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

i = A("i")
j = B("j")
g = C("g")
l = D("l")
d = E("d")
e = F("e")
a = D("a")
n = E("n")
c = F("c")
h = E("h")

i.o = h
j.x = a
j.u = a
j.w = g
j.o = e
g.o = l
l.w = j
d.r = l
d.s = j
d.x = j
d.o = c
d.u = n
e.y = c
e.o = g
a.w = j
n.r = l
n.s = j
n.x = j
n.o = c
n.u = d
c.y = e
c.o = g
h.r = l
h.s = j
h.x = j
h.o = e
h.u = n
assert h.o.o.o.txt == "l"