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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.o: E = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: I = None
        self.s: A = None
        self.v: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.u: I = None
        self.z: G = None
        self.q: I = None
        self.t: I = None
        self.y: I = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.w: G = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

g = A("g")
l = B("l")
h = C("h")
k = D("k")
f = E("f")
a = F("a")
m = G("m")
i = H("i")
b = I("b")
j = D("j")

g.x = b
g.z = f
l.w = a
l.t = m
l.o = f
l.v = g
l.u = g
h.x = f
h.y = k
k.p = l
k.u = i
k.r = f
f.t = i
f.q = b
f.p = b
f.s = g
f.v = h
a.r = i
a.t = i
a.p = h
a.s = j
a.x = f
a.u = m
a.y = m
a.v = b
a.z = l
m.t = g
m.q = k
m.v = j
i.w = g
i.x = m
i.z = m
i.u = b
i.q = b
i.t = b
i.y = b
i.o = a
b.o = m
b.w = m
b.p = f
b.r = l
b.t = l
j.p = l
j.u = i
j.r = f
assert a.p.y.p.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.o: E = None
        self.v: A = None
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: I = None
        self.s: A = None
        self.v: C = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: G = None
        self.u: I = None
        self.z: G = None
        self.q: I = None
        self.t: I = None
        self.y: I = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.w: G = None
        self.r: B = None
        self.t: B = None
        self.txt = txt

g = A("g")
l = B("l")
h = C("h")
k = D("k")
f = E("f")
a = F("a")
m = G("m")
i = H("i")
b = I("b")
j = D("j")

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