class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.y: C = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

h = A("h")
d = B("d")
f = C("f")
j = D("j")
m = E("m")
b = C("b")
c = C("c")
i = E("i")
a = E("a")

h.u = j
h.r = d
d.r = h
f.z = c
f.v = c
f.r = b
f.y = b
f.o = h
j.s = m
j.u = m
j.r = h
j.v = f
m.v = j
m.u = a
m.o = h
m.r = b
m.s = d
b.z = c
b.r = c
b.y = c
b.v = c
b.o = h
c.z = b
c.r = b
c.y = b
c.v = b
c.o = h
i.v = j
i.u = m
i.o = h
i.r = f
i.s = d
a.v = j
a.u = m
a.o = h
a.r = c
a.s = d
assert h.u.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.y: C = None
        self.o: A = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.r: A = None
        self.v: C = None
        self.txt = txt

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

h = A("h")
d = B("d")
f = C("f")
j = D("j")
m = E("m")
b = C("b")
c = C("c")
i = E("i")
a = E("a")

h.u = j
h.r = d
d.r = h
f.z = c
f.v = c
f.r = b
f.y = b
f.o = h
j.s = m
j.u = m
j.r = h
j.v = f
m.v = j
m.u = a
m.o = h
m.r = b
m.s = d
b.z = c
b.r = c
b.y = c
b.v = c
b.o = h
c.z = b
c.r = b
c.y = b
c.v = b
c.o = h
i.v = j
i.u = m
i.o = h
i.r = f
i.s = d
a.v = j
a.u = m
a.o = h
a.r = c
a.s = d
assert h.u.v.y.txt == "b"