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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: C = None
        self.q: A = None
        self.v: E = None
        self.t: E = None
        self.o: F = None
        self.p: B = None
        self.txt = txt

i = A("i")
j = B("j")
n = C("n")
k = D("k")
a = E("a")
c = F("c")
e = G("e")

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: C = None
        self.q: A = None
        self.v: E = None
        self.t: E = None
        self.o: F = None
        self.p: B = None
        self.txt = txt

i = A("i")
j = B("j")
n = C("n")
k = D("k")
a = E("a")
c = F("c")
e = G("e")

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