class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.q: H = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: I = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.y: H = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: E = None
        self.o: I = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: I = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.y: H = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: E = None
        self.o: I = None
        self.y: A = None
        self.txt = txt

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

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

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