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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.s: F = None
        self.y: G = None
        self.o: D = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: E = None
        self.x: F = None
        self.o: F = None
        self.t: I = None
        self.s: I = None
        self.r: E = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.t: I = None
        self.y: I = None
        self.u: D = None
        self.x: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.s: F = None
        self.y: G = None
        self.o: D = None
        self.x: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: E = None
        self.x: F = None
        self.o: F = None
        self.t: I = None
        self.s: I = None
        self.r: E = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: C = None
        self.t: I = None
        self.y: I = None
        self.u: D = None
        self.x: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.s: C = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

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

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