class A:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.q: C = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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