class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: B = None
        self.u: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

l = A("l")
g = B("g")
b = C("b")
i = D("i")
h = E("h")
a = A("a")
m = B("m")
c = E("c")
k = B("k")

l.q = i
l.v = g
l.u = c
l.y = m
l.t = h
g.z = c
g.r = h
g.t = a
g.y = i
b.p = c
i.y = b
i.r = m
i.w = g
h.y = l
a.q = i
a.v = g
a.u = h
a.t = h
a.y = k
m.z = c
m.r = c
m.t = l
m.y = i
c.y = l
k.z = c
k.r = h
k.t = a
k.y = i
assert i.r.t.y.r.y.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: B = None
        self.u: E = None
        self.y: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

l = A("l")
g = B("g")
b = C("b")
i = D("i")
h = E("h")
a = A("a")
m = B("m")
c = E("c")
k = B("k")

l.q = i
l.v = g
l.u = c
l.y = m
l.t = h
g.z = c
g.r = h
g.t = a
g.y = i
b.p = c
i.y = b
i.r = m
i.w = g
h.y = l
a.q = i
a.v = g
a.u = h
a.t = h
a.y = k
m.z = c
m.r = c
m.t = l
m.y = i
c.y = l
k.z = c
k.r = h
k.t = a
k.y = i
assert i.r.t.y.r.y.t.y.y.txt == "m"