class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: G = None
        self.z: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: C = None
        self.txt = txt

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

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

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