class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.t: B = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.w: G = None
        self.q: D = None
        self.v: F = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
c = C("c")
h = D("h")
a = E("a")
f = F("f")
k = G("k")
b = H("b")
i = G("i")
d = A("d")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: C = None
        self.w: G = None
        self.q: D = None
        self.v: F = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: H = None
        self.txt = txt

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

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

l = A("l")
m = B("m")
c = C("c")
h = D("h")
a = E("a")
f = F("f")
k = G("k")
b = H("b")
i = G("i")
d = A("d")

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