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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.u: G = None
        self.p: H = None
        self.y: C = None
        self.v: E = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: H = None
        self.v: A = None
        self.t: F = None
        self.z: I = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.u: D = None
        self.r: G = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.u: G = None
        self.p: H = None
        self.y: C = None
        self.v: E = None
        self.q: F = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: H = None
        self.v: A = None
        self.t: F = None
        self.z: I = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: D = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.u: D = None
        self.r: G = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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