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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.x: D = None
        self.t: A = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.r: E = None
        self.u: C = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.z: H = None
        self.v: F = None
        self.o: C = None
        self.q: H = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: E = None
        self.x: D = None
        self.t: A = None
        self.q: G = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.r: E = None
        self.u: C = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.z: H = None
        self.v: F = None
        self.o: C = None
        self.q: H = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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