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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.o: G = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.o: G = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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