class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: G = None
        self.v: D = 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.w: G = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.o: C = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.p: D = None
        self.txt = txt

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

i.q = h
i.w = h
i.r = h
i.v = e
f.z = i
c.w = h
c.o = i
c.z = m
j.p = h
j.z = d
j.t = d
j.o = c
j.v = k
d.x = m
d.o = m
d.v = c
d.z = i
k.y = e
k.t = f
k.z = f
h.t = c
h.x = i
h.v = i
h.s = d
h.r = j
h.w = j
m.s = k
m.o = j
m.p = e
e.p = h
e.z = d
e.t = d
e.o = c
e.v = k
assert e.v.y.p.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.r: G = None
        self.v: D = 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.w: G = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: E = None
        self.o: C = None
        self.v: F = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: C = None
        self.z: A = None
        self.o: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: D = None
        self.p: D = None
        self.txt = txt

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

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