class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.y: G = None
        self.q: G = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.x: D = None
        self.v: A = None
        self.y: D = None
        self.o: B = None
        self.s: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.r: C = None
        self.s: A = None
        self.t: C = None
        self.o: E = None
        self.txt = txt

n = A("n")
f = B("f")
g = C("g")
m = D("m")
j = E("j")
l = F("l")
d = G("d")
i = H("i")
k = D("k")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.x: D = None
        self.v: A = None
        self.y: D = None
        self.o: B = None
        self.s: B = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.r: C = None
        self.s: A = None
        self.t: C = None
        self.o: E = None
        self.txt = txt

n = A("n")
f = B("f")
g = C("g")
m = D("m")
j = E("j")
l = F("l")
d = G("d")
i = H("i")
k = D("k")

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