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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.z: B = None
        self.s: D = None
        self.w: F = None
        self.u: H = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: B = None
        self.z: B = None
        self.s: D = None
        self.w: F = None
        self.u: H = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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