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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.txt = txt

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

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

l = A("l")
c = B("c")
d = C("d")
e = D("e")
m = E("m")
f = F("f")
k = G("k")
g = E("g")
n = F("n")
i = C("i")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.x: G = None
        self.txt = txt

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

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

l = A("l")
c = B("c")
d = C("d")
e = D("e")
m = E("m")
f = F("f")
k = G("k")
g = E("g")
n = F("n")
i = C("i")

l.v = k
l.p = d
l.u = g
l.x = c
l.y = e
c.o = e
c.q = k
d.v = e
e.y = d
e.t = n
e.s = c
e.r = c
e.p = c
m.r = l
m.x = k
f.y = e
f.p = e
f.q = c
f.o = c
f.t = c
f.u = c
f.z = k
k.u = i
g.r = l
g.x = k
n.y = e
n.p = e
n.q = c
n.o = c
n.t = c
n.u = c
n.z = k
i.v = e
assert l.v.u.v.txt == "e"