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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: I = None
        self.z: H = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.o: H = None
        self.u: C = None
        self.q: A = None
        self.p: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.u: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: B = None
        self.u: G = None
        self.z: I = None
        self.w: I = None
        self.v: D = None
        self.x: E = None
        self.q: E = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: I = None
        self.q: B = None
        self.y: F = None
        self.s: F = None
        self.o: B = None
        self.u: A = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: I = None
        self.z: H = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: H = None
        self.o: H = None
        self.u: C = None
        self.q: A = None
        self.p: D = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: D = None
        self.u: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: B = None
        self.u: G = None
        self.z: I = None
        self.w: I = None
        self.v: D = None
        self.x: E = None
        self.q: E = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: I = None
        self.q: B = None
        self.y: F = None
        self.s: F = None
        self.o: B = None
        self.u: A = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

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

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