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

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: I = None
        self.z: I = None
        self.q: G = None
        self.t: B = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: I = None
        self.z: I = None
        self.q: G = None
        self.t: B = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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