class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: G = None
        self.z: B = None
        self.x: E = None
        self.p: C = None
        self.t: B = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.z: H = None
        self.w: E = None
        self.o: H = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.r: H = None
        self.y: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: D = None
        self.z: H = None
        self.w: E = None
        self.o: H = None
        self.t: E = None
        self.p: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.r: H = None
        self.y: A = None
        self.x: F = None
        self.txt = txt

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

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

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

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