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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.q: E = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.q: E = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: H = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

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

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