class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.u: E = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.x: A = None
        self.q: G = None
        self.o: A = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.o: E = None
        self.z: F = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

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

k = A("k")
g = B("g")
i = C("i")
m = D("m")
f = E("f")
n = F("n")
e = G("e")
a = G("a")
d = D("d")
c = F("c")

k.o = m
k.t = d
k.r = d
k.q = f
k.u = f
k.y = g
k.w = g
g.z = i
i.r = e
i.s = e
i.q = e
i.x = k
i.o = k
i.t = k
i.v = g
m.v = f
m.z = f
m.q = f
f.s = k
f.w = g
n.t = a
n.y = f
n.o = f
n.z = c
n.w = k
n.p = g
e.o = k
a.o = k
d.v = f
d.z = f
d.q = f
c.t = a
c.y = f
c.o = f
c.z = n
c.w = k
c.p = g
assert i.s.o.q.w.z.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.r: D = None
        self.q: E = None
        self.u: E = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: G = None
        self.x: A = None
        self.q: G = None
        self.o: A = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: E = None
        self.o: E = None
        self.z: F = None
        self.w: A = None
        self.p: B = None
        self.txt = txt

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

k = A("k")
g = B("g")
i = C("i")
m = D("m")
f = E("f")
n = F("n")
e = G("e")
a = G("a")
d = D("d")
c = F("c")

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