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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.z: I = None
        self.x: A = None
        self.w: D = None
        self.q: H = None
        self.r: F = None
        self.o: F = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: J = None
        self.p: E = None
        self.t: E = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.v: C = None
        self.o: J = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: J = None
        self.s: G = None
        self.u: D = None
        self.z: J = None
        self.p: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

f = A("f")
k = B("k")
h = C("h")
m = D("m")
g = E("g")
a = F("a")
i = G("i")
l = H("l")
n = I("n")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.z: I = None
        self.x: A = None
        self.w: D = None
        self.q: H = None
        self.r: F = None
        self.o: F = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: J = None
        self.p: E = None
        self.t: E = None
        self.o: E = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.v: C = None
        self.o: J = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: J = None
        self.s: G = None
        self.u: D = None
        self.z: J = None
        self.p: G = None
        self.y: F = None
        self.x: C = None
        self.txt = txt

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

f = A("f")
k = B("k")
h = C("h")
m = D("m")
g = E("g")
a = F("a")
i = G("i")
l = H("l")
n = I("n")
d = J("d")

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