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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: H = None
        self.y: E = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.s: B = None
        self.q: B = None
        self.z: J = None
        self.y: B = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: J = None
        self.z: C = None
        self.p: C = None
        self.y: F = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: I = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.p: G = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: H = None
        self.y: E = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: A = None
        self.s: B = None
        self.q: B = None
        self.z: J = None
        self.y: B = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: J = None
        self.z: C = None
        self.p: C = None
        self.y: F = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: I = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.p: G = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

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

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

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