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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: B = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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