class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.p: F = None
        self.u: I = None
        self.t: G = None
        self.q: E = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.z: I = None
        self.t: G = None
        self.v: C = None
        self.o: H = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: B = None
        self.y: B = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.z: I = None
        self.t: G = None
        self.v: C = None
        self.o: H = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: B = None
        self.y: B = None
        self.v: D = None
        self.txt = txt

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

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