class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: C = None
        self.o: C = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

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

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

n.r = d
i.v = j
i.u = a
i.s = b
i.r = k
d.v = j
d.p = n
d.s = n
d.r = a
d.z = c
d.o = b
d.w = l
m.r = l
m.t = b
m.s = b
m.w = d
m.v = j
l.x = b
l.u = i
c.v = d
c.o = d
c.s = b
c.u = b
c.w = k
c.t = m
a.v = j
a.z = l
j.r = l
j.t = d
j.s = d
j.w = d
j.v = m
k.v = m
k.u = a
k.s = d
k.r = i
b.v = j
b.p = n
b.s = n
b.r = a
b.z = c
b.o = d
b.w = l
assert d.w.u.u.v.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.u: C = None
        self.o: C = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

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

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

n.r = d
i.v = j
i.u = a
i.s = b
i.r = k
d.v = j
d.p = n
d.s = n
d.r = a
d.z = c
d.o = b
d.w = l
m.r = l
m.t = b
m.s = b
m.w = d
m.v = j
l.x = b
l.u = i
c.v = d
c.o = d
c.s = b
c.u = b
c.w = k
c.t = m
a.v = j
a.z = l
j.r = l
j.t = d
j.s = d
j.w = d
j.v = m
k.v = m
k.u = a
k.s = d
k.r = i
b.v = j
b.p = n
b.s = n
b.r = a
b.z = c
b.o = d
b.w = l
assert d.w.u.u.v.v.r.txt == "l"