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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: G = None
        self.o: H = None
        self.s: I = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.v: G = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.x: E = None
        self.w: H = None
        self.t: A = None
        self.z: A = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: G = None
        self.o: H = None
        self.s: I = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.v: G = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.x: E = None
        self.w: H = None
        self.t: A = None
        self.z: A = None
        self.q: G = None
        self.r: F = None
        self.txt = txt

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

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

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