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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.t: G = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: H = None
        self.t: G = None
        self.x: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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