class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: I = None
        self.q: G = None
        self.v: B = None
        self.u: B = None
        self.z: H = None
        self.t: B = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.t: D = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.q: J = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.y: G = None
        self.s: D = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.t: D = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.q: J = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: C = None
        self.y: G = None
        self.s: D = None
        self.x: H = None
        self.w: A = None
        self.txt = txt

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

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

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