class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.o: C = None
        self.y: D = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.r: F = None
        self.x: F = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.r: F = None
        self.x: F = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.txt = txt

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

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

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