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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.t: A = None
        self.s: E = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.s: B = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

g.r = k
g.x = b
g.w = l
g.s = l
g.v = a
n.t = m
n.z = m
n.r = l
n.x = j
n.y = b
m.q = a
m.z = l
m.t = g
m.s = b
m.v = b
j.z = m
j.r = b
b.v = g
b.y = j
b.x = k
b.t = k
b.q = l
b.u = a
k.q = g
k.v = j
l.v = j
l.q = k
a.z = n
a.r = n
a.q = b
a.s = e
a.p = g
e.t = m
e.z = m
e.r = l
e.x = j
e.y = b
assert g.v.p.x.y.r.v.r.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.w: G = None
        self.v: H = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: G = None
        self.t: A = None
        self.s: E = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: E = None
        self.s: B = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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