class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: G = None
        self.v: B = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: J = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: J = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: B = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.w: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.t: F = None
        self.txt = txt

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

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