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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.z: E = None
        self.p: A = None
        self.u: G = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: G = None
        self.u: D = None
        self.v: A = None
        self.w: A = None
        self.z: H = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.x: E = None
        self.p: D = None
        self.t: B = None
        self.y: A = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.z: E = None
        self.p: A = None
        self.u: G = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: G = None
        self.u: D = None
        self.v: A = None
        self.w: A = None
        self.z: H = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.x: E = None
        self.p: D = None
        self.t: B = None
        self.y: A = None
        self.s: A = None
        self.w: A = None
        self.txt = txt

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

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

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

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