class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.y: F = None
        self.u: A = None
        self.s: D = None
        self.o: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: C = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.z: I = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.p: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: E = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.y: F = None
        self.u: A = None
        self.s: D = None
        self.o: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.w: C = None
        self.u: C = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.z: I = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: D = None
        self.p: E = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

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