class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.y: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.r: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.y: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.r: E = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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