class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.w: D = None
        self.y: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.w: H = None
        self.o: B = None
        self.t: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.t: F = None
        self.z: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.w: H = None
        self.o: B = None
        self.t: H = None
        self.z: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.t: F = None
        self.z: A = None
        self.o: F = None
        self.txt = txt

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

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

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