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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.t: E = None
        self.s: B = None
        self.p: D = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: A = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.t: E = None
        self.s: B = None
        self.p: D = None
        self.u: G = None
        self.txt = txt

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

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

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

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