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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.t: A = None
        self.w: F = None
        self.o: A = None
        self.r: A = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: A = None
        self.u: G = None
        self.y: H = None
        self.s: F = None
        self.z: A = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: A = None
        self.w: C = None
        self.q: A = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.o: B = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: F = None
        self.t: A = None
        self.w: F = None
        self.o: A = None
        self.r: A = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: A = None
        self.u: G = None
        self.y: H = None
        self.s: F = None
        self.z: A = None
        self.v: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: A = None
        self.w: C = None
        self.q: A = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: G = None
        self.o: B = None
        self.y: A = None
        self.p: D = None
        self.txt = txt

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

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