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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.s: G = None
        self.u: F = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.p: J = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.x: F = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.s: G = None
        self.u: F = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: H = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.p: J = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: F = None
        self.x: F = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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