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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.p: E = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.t: C = None
        self.x: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.p: E = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.t: C = None
        self.x: G = None
        self.p: B = None
        self.txt = txt

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

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

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