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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.r: E = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: I = None
        self.w: G = None
        self.s: G = None
        self.p: I = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.r: E = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: I = None
        self.w: G = None
        self.s: G = None
        self.p: I = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: D = None
        self.q: H = None
        self.txt = txt

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

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