class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: D = None
        self.y: F = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: B = None
        self.v: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.u: A = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: B = None
        self.v: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.u: A = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

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

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