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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.u: C = None
        self.y: G = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.u: C = None
        self.y: G = None
        self.s: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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