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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.r: A = None
        self.w: C = None
        self.y: G = None
        self.q: A = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: H = None
        self.txt = txt

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

j = A("j")
k = B("k")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
n = G("n")
h = H("h")

j.r = l
j.o = b
j.w = b
j.p = h
k.w = i
k.o = h
k.t = j
i.t = l
l.u = b
l.v = j
l.r = j
l.q = j
l.w = i
l.o = i
l.y = n
l.x = n
d.z = i
d.p = k
d.x = n
b.r = n
b.u = l
b.o = l
b.z = h
b.p = k
n.y = b
n.o = h
h.w = i
assert i.t.q.o.z.w.t.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: F = None
        self.w: F = None
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: A = None
        self.r: A = None
        self.w: C = None
        self.y: G = None
        self.q: A = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: B = None
        self.x: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: H = None
        self.txt = txt

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

j = A("j")
k = B("k")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
n = G("n")
h = H("h")

j.r = l
j.o = b
j.w = b
j.p = h
k.w = i
k.o = h
k.t = j
i.t = l
l.u = b
l.v = j
l.r = j
l.q = j
l.w = i
l.o = i
l.y = n
l.x = n
d.z = i
d.p = k
d.x = n
b.r = n
b.u = l
b.o = l
b.z = h
b.p = k
n.y = b
n.o = h
h.w = i
assert i.t.q.o.z.w.t.w.t.txt == "l"