class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: D = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: G = None
        self.w: A = None
        self.y: C = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.y: D = None
        self.r: D = None
        self.q: H = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: C = None
        self.t: A = None
        self.z: A = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: D = None
        self.u: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: G = None
        self.w: A = None
        self.y: C = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.y: D = None
        self.r: D = None
        self.q: H = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: I = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: C = None
        self.t: A = None
        self.z: A = None
        self.q: H = None
        self.w: H = None
        self.txt = txt

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

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