class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: C = None
        self.t: H = None
        self.o: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.r: F = None
        self.p: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: I = None
        self.q: C = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: H = None
        self.txt = txt

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

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