class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.o: F = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: H = None
        self.p: E = None
        self.t: F = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: H = None
        self.x: H = None
        self.p: H = None
        self.t: G = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.y: B = None
        self.r: G = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.v: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

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

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

j.y = h
j.r = c
j.o = n
j.v = k
j.p = k
h.r = i
h.x = d
h.u = d
h.p = m
h.t = n
c.q = n
i.u = d
i.y = d
i.x = d
i.p = d
i.o = d
i.t = k
i.w = n
m.o = h
m.y = h
m.t = i
m.r = k
m.s = d
n.r = k
n.u = k
n.z = j
n.v = h
n.x = h
k.s = n
k.y = d
k.x = h
d.r = i
d.o = n
d.u = c
assert j.v.y.r.w.z.r.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.o: F = None
        self.v: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: H = None
        self.p: E = None
        self.t: F = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: H = None
        self.x: H = None
        self.p: H = None
        self.t: G = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.y: B = None
        self.r: G = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: A = None
        self.v: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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