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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.t: A = None
        self.o: A = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.w: G = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.txt = txt

e = A("e")
n = B("n")
l = C("l")
a = D("a")
d = E("d")
i = F("i")
h = G("h")
j = C("j")
k = B("k")

e.p = j
n.s = a
n.z = l
n.t = e
n.o = e
n.p = k
n.r = i
l.p = n
l.u = i
l.w = h
l.t = e
l.o = e
a.q = d
d.u = h
i.x = e
i.u = a
i.p = h
h.u = j
h.o = d
j.p = n
j.u = i
j.w = h
j.t = e
j.o = e
k.s = a
k.z = j
k.t = e
k.o = e
k.p = n
k.r = i
assert a.q.u.o.u.o.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: C = None
        self.t: A = None
        self.o: A = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.w: G = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: E = None
        self.txt = txt

e = A("e")
n = B("n")
l = C("l")
a = D("a")
d = E("d")
i = F("i")
h = G("h")
j = C("j")
k = B("k")

e.p = j
n.s = a
n.z = l
n.t = e
n.o = e
n.p = k
n.r = i
l.p = n
l.u = i
l.w = h
l.t = e
l.o = e
a.q = d
d.u = h
i.x = e
i.u = a
i.p = h
h.u = j
h.o = d
j.p = n
j.u = i
j.w = h
j.t = e
j.o = e
k.s = a
k.z = j
k.t = e
k.o = e
k.p = n
k.r = i
assert a.q.u.o.u.o.u.u.txt == "j"