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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.u: G = None
        self.x: A = None
        self.s: I = None
        self.o: D = None
        self.z: A = None
        self.y: I = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.x: B = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: F = None
        self.w: I = None
        self.q: D = None
        self.u: B = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.u: G = None
        self.x: A = None
        self.s: I = None
        self.o: D = None
        self.z: A = None
        self.y: I = None
        self.r: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: A = None
        self.x: B = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: F = None
        self.w: I = None
        self.q: D = None
        self.u: B = None
        self.o: F = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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