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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.s: D = None
        self.o: I = None
        self.r: A = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: I = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: J = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.w: B = None
        self.z: G = None
        self.x: F = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.s: D = None
        self.o: I = None
        self.r: A = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: I = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: J = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.w: B = None
        self.z: G = None
        self.x: F = None
        self.v: I = None
        self.r: E = None
        self.txt = txt

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

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