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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: B = None
        self.u: D = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: B = None
        self.u: D = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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