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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.w: E = None
        self.x: G = None
        self.s: C = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.t: A = None
        self.y: H = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: F = None
        self.w: E = None
        self.x: G = None
        self.s: C = None
        self.t: G = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.p: G = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: B = None
        self.t: A = None
        self.y: H = None
        self.o: C = None
        self.u: B = None
        self.txt = txt

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

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

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