class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: B = None
        self.x: G = None
        self.q: D = None
        self.s: B = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.w: A = None
        self.x: A = None
        self.q: G = None
        self.u: G = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.r: H = None
        self.w: C = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.w: A = None
        self.x: A = None
        self.q: G = None
        self.u: G = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.r: H = None
        self.w: C = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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