class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.w: C = None
        self.q: C = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: D = None
        self.w: C = None
        self.q: C = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

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

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