class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: B = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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