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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.q: H = None
        self.o: B = None
        self.p: H = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: A = None
        self.o: B = None
        self.w: E = None
        self.u: A = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: F = None
        self.q: H = None
        self.o: B = None
        self.p: H = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: A = None
        self.o: B = None
        self.w: E = None
        self.u: A = None
        self.q: G = None
        self.txt = txt

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

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