class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: I = None
        self.w: I = None
        self.r: F = None
        self.u: B = None
        self.v: G = None
        self.s: B = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.s: B = None
        self.w: F = None
        self.r: I = None
        self.o: E = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.o: G = None
        self.x: C = None
        self.v: I = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.txt = txt

a = A("a")
g = B("g")
i = C("i")
j = D("j")
f = E("f")
n = F("n")
m = G("m")
e = H("e")
d = I("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: I = None
        self.w: I = None
        self.r: F = None
        self.u: B = None
        self.v: G = None
        self.s: B = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.y: C = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: B = None
        self.s: B = None
        self.w: F = None
        self.r: I = None
        self.o: E = None
        self.v: B = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.o: G = None
        self.x: C = None
        self.v: I = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.txt = txt

a = A("a")
g = B("g")
i = C("i")
j = D("j")
f = E("f")
n = F("n")
m = G("m")
e = H("e")
d = I("d")

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