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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.q: F = None
        self.v: E = None
        self.y: E = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.z: H = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.r: A = None
        self.p: C = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

c = A("c")
k = B("k")
a = C("a")
d = D("d")
m = E("m")
f = F("f")
i = G("i")
j = H("j")
e = C("e")

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.q: F = None
        self.v: E = None
        self.y: E = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.z: H = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.w: G = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.r: A = None
        self.p: C = None
        self.s: E = None
        self.w: C = None
        self.txt = txt

c = A("c")
k = B("k")
a = C("a")
d = D("d")
m = E("m")
f = F("f")
i = G("i")
j = H("j")
e = C("e")

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