class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.z: D = None
        self.x: E = None
        self.o: I = None
        self.r: E = None
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: F = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: B = None
        self.z: D = None
        self.x: E = None
        self.o: I = None
        self.r: E = None
        self.w: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: F = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

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

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