class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: F = None
        self.r: G = None
        self.v: E = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: A = None
        self.y: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: F = None
        self.r: G = None
        self.v: E = None
        self.w: G = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: A = None
        self.y: A = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.o: B = None
        self.s: D = None
        self.txt = txt

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

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