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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.x: B = None
        self.u: E = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: F = None
        self.y: F = None
        self.r: F = None
        self.u: E = None
        self.v: B = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

i = A("i")
b = B("b")
d = C("d")
a = D("a")
g = E("g")
m = F("m")
l = G("l")
k = H("k")
e = H("e")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.x: B = None
        self.u: E = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: F = None
        self.y: F = None
        self.r: F = None
        self.u: E = None
        self.v: B = None
        self.o: A = None
        self.s: G = None
        self.txt = txt

i = A("i")
b = B("b")
d = C("d")
a = D("a")
g = E("g")
m = F("m")
l = G("l")
k = H("k")
e = H("e")

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