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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.s: F = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: G = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.s: F = None
        self.p: A = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: G = None
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: D = None
        self.w: B = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

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