class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.u: E = None
        self.t: D = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.t: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.t: B = None
        self.z: E = None
        self.txt = txt

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

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