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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.u: H = None
        self.q: D = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: F = None
        self.w: F = None
        self.t: G = None
        self.y: H = None
        self.s: C = None
        self.u: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: G = None
        self.z: A = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.q: D = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.y: D = None
        self.w: C = None
        self.x: B = None
        self.r: B = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: F = None
        self.u: H = None
        self.q: D = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: F = None
        self.w: F = None
        self.t: G = None
        self.y: H = None
        self.s: C = None
        self.u: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: G = None
        self.z: A = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: C = None
        self.q: D = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.y: D = None
        self.w: C = None
        self.x: B = None
        self.r: B = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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