class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: F = None
        self.p: F = None
        self.r: C = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.z: C = None
        self.q: J = None
        self.p: C = None
        self.y: I = None
        self.t: C = None
        self.s: C = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.x: F = None
        self.s: G = None
        self.t: F = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.z: E = None
        self.w: I = None
        self.r: C = None
        self.v: B = None
        self.q: F = None
        self.p: C = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: G = None
        self.v: H = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
l = D("l")
h = E("h")
n = F("n")
k = G("k")
b = H("b")
c = I("c")
a = J("a")

j.u = h
j.o = n
j.p = n
j.r = f
j.q = c
e.x = n
e.r = n
e.z = f
e.p = f
e.t = f
e.s = f
e.q = a
e.u = a
e.y = c
f.t = k
f.y = n
l.q = b
l.p = e
l.v = e
l.x = n
l.t = n
l.s = k
l.o = k
h.u = n
h.w = l
h.p = c
n.p = b
n.z = h
k.z = n
k.y = n
k.v = h
b.t = k
b.y = k
b.o = e
b.v = e
b.z = h
b.w = c
b.r = f
b.p = f
b.u = f
b.q = n
c.w = h
a.p = l
a.u = l
a.r = k
a.v = b
a.w = e
assert c.w.w.x.p.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: F = None
        self.p: F = None
        self.r: C = None
        self.q: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.z: C = None
        self.q: J = None
        self.p: C = None
        self.y: I = None
        self.t: C = None
        self.s: C = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.x: F = None
        self.s: G = None
        self.t: F = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.z: E = None
        self.w: I = None
        self.r: C = None
        self.v: B = None
        self.q: F = None
        self.p: C = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: G = None
        self.v: H = None
        self.w: B = None
        self.u: D = None
        self.txt = txt

j = A("j")
e = B("e")
f = C("f")
l = D("l")
h = E("h")
n = F("n")
k = G("k")
b = H("b")
c = I("c")
a = J("a")

j.u = h
j.o = n
j.p = n
j.r = f
j.q = c
e.x = n
e.r = n
e.z = f
e.p = f
e.t = f
e.s = f
e.q = a
e.u = a
e.y = c
f.t = k
f.y = n
l.q = b
l.p = e
l.v = e
l.x = n
l.t = n
l.s = k
l.o = k
h.u = n
h.w = l
h.p = c
n.p = b
n.z = h
k.z = n
k.y = n
k.v = h
b.t = k
b.y = k
b.o = e
b.v = e
b.z = h
b.w = c
b.r = f
b.p = f
b.u = f
b.q = n
c.w = h
a.p = l
a.u = l
a.r = k
a.v = b
a.w = e
assert c.w.w.x.p.w.w.txt == "h"