class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: H = None
        self.x: F = None
        self.y: I = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: I = None
        self.y: E = None
        self.t: H = None
        self.o: I = None
        self.u: I = None
        self.v: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.q: E = None
        self.z: C = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: J = None
        self.o: G = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: I = None
        self.y: E = None
        self.t: H = None
        self.o: I = None
        self.u: I = None
        self.v: H = None
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.y: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: A = None
        self.q: E = None
        self.z: C = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

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