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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: C = None
        self.w: G = None
        self.o: C = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

i = A("i")
f = B("f")
b = C("b")
n = D("n")
e = E("e")
j = F("j")
d = G("d")
g = H("g")
c = I("c")

i.z = g
i.w = g
i.r = f
i.p = f
i.s = j
i.t = e
i.o = e
i.y = n
i.v = c
f.s = e
b.t = e
n.r = g
e.y = f
j.x = i
j.q = i
j.u = i
j.v = e
j.t = n
j.o = n
j.w = c
j.p = f
d.p = b
d.u = b
d.r = n
d.s = f
d.t = g
d.w = c
d.q = j
g.o = i
g.t = n
g.v = j
g.u = j
g.q = c
g.s = c
g.y = d
g.x = d
g.z = e
c.y = g
c.q = g
c.x = b
c.o = b
c.p = b
c.w = d
assert b.t.y.s.y.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.p: B = None
        self.s: F = None
        self.t: E = None
        self.y: D = None
        self.o: E = None
        self.v: I = None
        self.w: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: C = None
        self.w: G = None
        self.o: C = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

i = A("i")
f = B("f")
b = C("b")
n = D("n")
e = E("e")
j = F("j")
d = G("d")
g = H("g")
c = I("c")

i.z = g
i.w = g
i.r = f
i.p = f
i.s = j
i.t = e
i.o = e
i.y = n
i.v = c
f.s = e
b.t = e
n.r = g
e.y = f
j.x = i
j.q = i
j.u = i
j.v = e
j.t = n
j.o = n
j.w = c
j.p = f
d.p = b
d.u = b
d.r = n
d.s = f
d.t = g
d.w = c
d.q = j
g.o = i
g.t = n
g.v = j
g.u = j
g.q = c
g.s = c
g.y = d
g.x = d
g.z = e
c.y = g
c.q = g
c.x = b
c.o = b
c.p = b
c.w = d
assert b.t.y.s.y.s.y.txt == "f"