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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.t: D = None
        self.p: G = None
        self.x: E = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: A = None
        self.u: D = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: F = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: A = None
        self.t: D = None
        self.p: G = None
        self.x: E = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: A = None
        self.u: D = None
        self.w: A = None
        self.v: D = None
        self.txt = txt

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

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