class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.z: G = None
        self.y: C = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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