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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.v: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.z: B = None
        self.p: E = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.q: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.v: H = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.z: B = None
        self.p: E = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

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

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

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