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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.x: A = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

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

l.y = j
c.v = l
c.y = l
c.w = a
n.p = a
n.q = d
n.t = d
f.s = h
f.o = n
d.w = c
d.u = e
d.x = l
d.t = l
d.p = j
e.w = c
e.u = d
e.x = l
e.t = l
e.p = i
h.p = c
h.q = d
h.t = e
a.v = l
a.y = l
a.w = c
i.s = h
i.o = h
j.s = h
j.o = h
assert h.p.y.y.s.t.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.x: A = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

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

l.y = j
c.v = l
c.y = l
c.w = a
n.p = a
n.q = d
n.t = d
f.s = h
f.o = n
d.w = c
d.u = e
d.x = l
d.t = l
d.p = j
e.w = c
e.u = d
e.x = l
e.t = l
e.p = i
h.p = c
h.q = d
h.t = e
a.v = l
a.y = l
a.w = c
i.s = h
i.o = h
j.s = h
j.o = h
assert h.p.y.y.s.t.t.y.txt == "j"