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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.r: C = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.s: I = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

m.p = f
m.w = f
m.t = g
m.r = g
m.v = e
m.x = l
m.o = k
d.t = m
d.z = m
d.o = f
d.r = f
d.w = l
f.z = k
f.y = l
l.x = d
l.w = d
l.u = i
l.v = i
l.o = e
l.r = m
l.t = n
n.t = f
n.z = i
n.s = g
n.v = k
n.y = k
k.z = g
k.y = g
k.p = m
k.r = n
k.v = n
i.w = e
e.w = m
g.s = k
g.z = k
g.w = k
g.o = k
g.v = k
g.x = n
g.u = m
g.q = m
g.y = l
assert l.x.r.z.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: C = None
        self.t: I = None
        self.v: H = None
        self.x: D = None
        self.r: I = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.r: C = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.s: I = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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