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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.w: I = None
        self.r: D = None
        self.t: E = None
        self.o: G = None
        self.y: G = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.z: E = None
        self.r: E = None
        self.w: E = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.w: I = None
        self.r: D = None
        self.t: E = None
        self.o: G = None
        self.y: G = None
        self.s: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.z: E = None
        self.r: E = None
        self.w: E = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

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