class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: B = None
        self.u: E = None
        self.y: B = None
        self.o: C = None
        self.v: C = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: B = None
        self.t: F = None
        self.o: B = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.q: E = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.v: C = None
        self.x: C = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: B = None
        self.t: F = None
        self.o: B = None
        self.r: B = None
        self.y: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: A = None
        self.q: E = None
        self.t: D = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.v: C = None
        self.x: C = None
        self.r: E = None
        self.txt = txt

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

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

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