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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.z: D = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: F = None
        self.u: B = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: G = None
        self.w: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.z: D = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: F = None
        self.u: B = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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