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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

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

h.u = m
h.z = n
h.r = c
h.t = f
e.u = m
e.z = l
e.v = l
e.p = k
l.t = e
l.v = e
l.x = h
f.t = e
f.u = c
k.w = n
k.q = c
n.t = k
n.q = k
m.q = n
m.t = n
m.z = k
m.x = k
i.o = m
i.z = f
i.r = f
i.v = f
i.q = f
i.t = l
i.p = e
i.u = c
i.s = c
c.o = k
c.v = e
g.u = m
g.z = n
g.r = c
g.t = f
assert l.t.z.v.z.x.z.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.r: I = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: C = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

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

h.u = m
h.z = n
h.r = c
h.t = f
e.u = m
e.z = l
e.v = l
e.p = k
l.t = e
l.v = e
l.x = h
f.t = e
f.u = c
k.w = n
k.q = c
n.t = k
n.q = k
m.q = n
m.t = n
m.z = k
m.x = k
i.o = m
i.z = f
i.r = f
i.v = f
i.q = f
i.t = l
i.p = e
i.u = c
i.s = c
c.o = k
c.v = e
g.u = m
g.z = n
g.r = c
g.t = f
assert l.t.z.v.z.x.z.t.txt == "k"