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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: H = None
        self.s: H = None
        self.r: A = None
        self.z: A = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: H = None
        self.s: H = None
        self.r: A = None
        self.z: A = None
        self.t: H = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: C = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

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

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