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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: I = None
        self.u: G = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.s: G = None
        self.w: I = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: C = None
        self.t: I = None
        self.y: H = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: E = None
        self.y: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: I = None
        self.u: G = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.s: G = None
        self.w: I = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: C = None
        self.t: I = None
        self.y: H = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

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