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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: H = None
        self.r: A = None
        self.x: E = None
        self.txt = txt

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

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