class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: E = None
        self.w: C = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.p: A = None
        self.t: C = None
        self.z: F = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.s: H = None
        self.w: G = None
        self.u: C = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
d = C("d")
h = D("h")
a = E("a")
g = F("g")
m = G("m")
k = H("k")

e.o = h
e.y = h
e.t = a
e.w = d
e.p = k
j.w = e
j.p = e
j.o = m
j.t = d
j.y = d
j.z = g
j.s = g
d.y = k
h.x = a
h.t = a
h.q = k
h.s = k
h.w = m
h.u = d
a.o = k
g.o = j
m.t = d
m.u = k
k.y = a
k.u = a
k.x = a
k.r = j
assert j.t.y.r.t.y.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: E = None
        self.w: C = None
        self.p: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: G = None
        self.p: A = None
        self.t: C = None
        self.z: F = None
        self.y: C = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: H = None
        self.s: H = None
        self.w: G = None
        self.u: C = None
        self.t: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

e = A("e")
j = B("j")
d = C("d")
h = D("h")
a = E("a")
g = F("g")
m = G("m")
k = H("k")

e.o = h
e.y = h
e.t = a
e.w = d
e.p = k
j.w = e
j.p = e
j.o = m
j.t = d
j.y = d
j.z = g
j.s = g
d.y = k
h.x = a
h.t = a
h.q = k
h.s = k
h.w = m
h.u = d
a.o = k
g.o = j
m.t = d
m.u = k
k.y = a
k.u = a
k.x = a
k.r = j
assert j.t.y.r.t.y.u.o.txt == "k"