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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: E = None
        self.p: F = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.z: A = None
        self.u: G = None
        self.x: F = None
        self.v: F = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.r: G = None
        self.s: D = None
        self.y: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: G = None
        self.x: D = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: E = None
        self.p: F = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.z: A = None
        self.u: G = None
        self.x: F = None
        self.v: F = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.r: G = None
        self.s: D = None
        self.y: E = None
        self.p: B = None
        self.t: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: D = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: G = None
        self.x: D = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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