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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

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

j.r = n
j.s = n
j.q = l
j.p = m
j.v = k
m.t = k
m.v = k
m.u = n
m.z = i
m.s = i
m.x = l
m.r = l
h.q = g
h.p = j
h.v = e
n.v = j
n.o = i
n.u = g
n.w = k
a.s = g
a.q = e
a.z = n
a.x = j
i.o = k
i.z = l
i.r = n
k.u = j
l.t = k
l.v = k
l.u = n
l.z = i
l.s = i
l.x = m
l.r = m
g.q = h
g.p = j
g.v = e
e.s = h
e.q = a
e.z = n
e.x = j
assert k.u.p.z.z.z.o.u.p.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.q: B = None
        self.p: B = None
        self.v: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

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

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

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

j.r = n
j.s = n
j.q = l
j.p = m
j.v = k
m.t = k
m.v = k
m.u = n
m.z = i
m.s = i
m.x = l
m.r = l
h.q = g
h.p = j
h.v = e
n.v = j
n.o = i
n.u = g
n.w = k
a.s = g
a.q = e
a.z = n
a.x = j
i.o = k
i.z = l
i.r = n
k.u = j
l.t = k
l.v = k
l.u = n
l.z = i
l.s = i
l.x = m
l.r = m
g.q = h
g.p = j
g.v = e
e.s = h
e.q = a
e.z = n
e.x = j
assert k.u.p.z.z.z.o.u.p.v.u.txt == "j"