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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.p: E = None
        self.w: I = None
        self.r: G = None
        self.o: C = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.s: G = None
        self.p: F = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: D = None
        self.y: H = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: I = None
        self.x: E = None
        self.r: B = None
        self.p: A = None
        self.u: E = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.w: C = None
        self.t: B = None
        self.z: B = None
        self.y: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: C = None
        self.p: E = None
        self.w: I = None
        self.r: G = None
        self.o: C = None
        self.y: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: E = None
        self.s: G = None
        self.p: F = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: D = None
        self.y: H = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: I = None
        self.x: E = None
        self.r: B = None
        self.p: A = None
        self.u: E = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.w: C = None
        self.t: B = None
        self.z: B = None
        self.y: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

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

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