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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.p: B = None
        self.r: E = None
        self.q: E = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.p: B = None
        self.r: E = None
        self.q: E = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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