class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: B = None
        self.o: B = None
        self.y: H = None
        self.r: B = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.o: F = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.x: E = None
        self.p: I = None
        self.v: E = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.x: B = None
        self.z: F = None
        self.y: J = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.u: B = None
        self.r: I = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: I = None
        self.q: D = None
        self.t: E = None
        self.o: C = None
        self.r: D = None
        self.w: I = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.o: F = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: D = None
        self.x: E = None
        self.p: I = None
        self.v: E = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.x: B = None
        self.z: F = None
        self.y: J = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.u: B = None
        self.r: I = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: I = None
        self.q: D = None
        self.t: E = None
        self.o: C = None
        self.r: D = None
        self.w: I = None
        self.s: A = None
        self.txt = txt

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

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