class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: B = None
        self.t: B = None
        self.w: F = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.r: A = None
        self.o: A = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.r: A = None
        self.o: A = None
        self.u: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

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