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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.y: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: J = None
        self.w: G = None
        self.t: C = None
        self.u: A = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: A = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: B = None
        self.y: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: J = None
        self.w: G = None
        self.t: C = None
        self.u: A = None
        self.o: G = None
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: A = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

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

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