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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.s: H = None
        self.p: I = None
        self.q: B = None
        self.y: A = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.s: H = None
        self.p: I = None
        self.q: B = None
        self.y: A = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: G = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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