class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: C = None
        self.x: H = None
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.t: H = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: D = None
        self.t: H = None
        self.x: C = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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