class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.t: C = None
        self.q: H = None
        self.w: H = None
        self.v: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.t: B = None
        self.p: E = None
        self.y: A = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.y: E = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

k = A("k")
j = B("j")
m = C("m")
g = D("g")
l = E("l")
h = F("h")
i = G("i")
f = H("f")
e = B("e")
c = F("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.t: B = None
        self.p: E = None
        self.y: A = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.y: E = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

k = A("k")
j = B("j")
m = C("m")
g = D("g")
l = E("l")
h = F("h")
i = G("i")
f = H("f")
e = B("e")
c = F("c")

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