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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.w: F = None
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.w: F = None
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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