class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: F = None
        self.w: B = None
        self.y: D = None
        self.u: E = None
        self.r: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.p: C = None
        self.q: A = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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