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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.p: A = None
        self.y: E = None
        self.t: A = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: G = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.p: A = None
        self.y: E = None
        self.t: A = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: G = None
        self.s: E = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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