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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: F = None
        self.y: A = None
        self.x: F = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.r: B = None
        self.z: C = None
        self.w: G = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: F = None
        self.y: A = None
        self.x: F = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.r: B = None
        self.z: C = None
        self.w: G = None
        self.u: B = None
        self.s: D = None
        self.txt = txt

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

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

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

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