class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: C = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.w: J = None
        self.y: J = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: F = None
        self.u: J = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: C = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.r: H = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.w: J = None
        self.y: J = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: F = None
        self.u: J = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: H = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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