class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.z: E = None
        self.y: G = None
        self.t: I = None
        self.q: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: F = None
        self.u: C = None
        self.q: G = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: F = None
        self.u: C = None
        self.q: G = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

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

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