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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: H = None
        self.o: H = None
        self.q: C = None
        self.v: A = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.t: F = None
        self.q: F = None
        self.v: I = None
        self.o: A = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: G = None
        self.v: D = None
        self.x: G = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: I = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: H = None
        self.o: H = None
        self.q: C = None
        self.v: A = None
        self.t: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.t: F = None
        self.q: F = None
        self.v: I = None
        self.o: A = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: G = None
        self.v: D = None
        self.x: G = None
        self.r: E = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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