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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.q: F = None
        self.z: C = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.q: A = None
        self.o: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.q: F = None
        self.z: C = None
        self.y: A = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.q: A = None
        self.o: G = None
        self.s: C = None
        self.txt = txt

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

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

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