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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.x: F = None
        self.q: C = None
        self.v: B = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.x: C = None
        self.y: D = None
        self.z: B = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

k = A("k")
g = B("g")
l = C("l")
j = D("j")
n = E("n")
h = F("h")
e = G("e")
i = C("i")
m = A("m")

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: C = None
        self.x: F = None
        self.q: C = None
        self.v: B = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.x: C = None
        self.y: D = None
        self.z: B = None
        self.q: C = None
        self.s: B = None
        self.txt = txt

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

k = A("k")
g = B("g")
l = C("l")
j = D("j")
n = E("n")
h = F("h")
e = G("e")
i = C("i")
m = A("m")

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