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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.p: G = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.p: G = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: C = None
        self.z: A = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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