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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.u: F = None
        self.w: E = None
        self.z: E = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.z: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: B = None
        self.u: F = None
        self.w: E = None
        self.z: E = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.z: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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