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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: C = None
        self.txt = txt

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

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

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

k.z = c
k.u = h
k.t = l
k.x = i
d.v = i
d.y = i
d.r = l
d.u = g
g.q = b
g.r = b
h.u = k
h.o = k
h.q = b
c.y = h
c.o = l
i.v = d
i.y = d
i.r = k
i.u = g
b.q = g
b.r = g
l.z = c
l.u = h
l.t = k
l.x = i
assert k.z.o.z.y.q.q.r.txt == "b"