class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

l.t = b
l.w = k
l.z = k
f.p = c
k.z = b
h.t = f
n.t = e
n.p = m
n.s = b
m.y = b
m.p = b
m.q = c
m.v = n
m.z = e
b.q = c
b.t = l
b.y = k
b.z = k
b.s = f
c.v = l
c.z = h
e.z = b
a.z = b
assert c.v.z.z.s.p.v.w.z.q.z.txt == "h"