class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.p: F = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: I = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.o: B = None
        self.u: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: I = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: B = None
        self.o: B = None
        self.u: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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