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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.z: D = None
        self.q: G = None
        self.txt = txt

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

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