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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.t: E = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.t: E = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.o: G = None
        self.q: B = None
        self.txt = txt

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

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